/*
 * 定义普通人，教师，班主任，学生，学校这些类，提供适当的成员变量，方法用于描述其内部数据和行为特征，并提供主类使之运行。
 */
class People {
 
    private String name;
    private int age;
 
    public People(String name, int age) {
        this.name = name;
        this.age = age;
    }
 
    public void run() {
        System.out.println(age + "岁的" + name + "正在跑步");
    }
}
 
class Student extends People {
 
 
    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
 
    public void study() {
        System.out.println(age + "岁的" + name + "正在学习");
    }
}
 
class Teacher extends People{
 
    // private String name;//姓名
    // private int age;//
 
    // public Teacher(String name, int age) {
    //     this.name = name;
    //     this.age = age;
    // }
 
    public void teach() {
        System.out.println(age + "岁的" + name + "正在教书");
    }
}
 
class HeadTeacher extends People{
 
    // private String name;//姓名
    // private int age;//
 
    // public HeadTeacher(String name, int age) {
    //     this.name = name;
    //     this.age = age;
    // }
 
    public void meeting() {
        System.out.println(age + "岁的" + name + "正在开会");
    }
}
 
class School extends People{
 
    private String name;
    private String address;//
 
    public School(String name, String address) {
        this.name = name;
        this.address = address;
    }
 
    public void celebration() {
        System.out.println("坐落在" + address + "的" + name + "正在举行校庆");
    }
}
 
public class mainTest1 {
 
    public static void main(String args[]) {
        // People people = new People("张三", 22);
        // people.run();
         
        Student student = new Student("李四", 14);
        // student.study();
         
        // Teacher teacher = new Teacher("王五", 32);
        // teacher.teach();
         
        // HeadTeacher headTeacher = new HeadTeacher("刘六", 42);
        // headTeacher.meeting();
         
        // School school = new School("北京大学", "北京");
        // school.celebration();
    }
}